import { post, get } from './axios'

//获取排班类别/班组树形数据
export function schedulingGroup_treeData() {
    return new Promise((resolve, reject) => {
        // get('/scheduling/schedulingGroup/getTreeData').then((data) => {
        get('/properties/schedulingGroup/getTreeData').then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}

//获取排班类别/班组分页列表
export function schedulingGroupQueryPage(params:object) {
    return new Promise((resolve, reject) => {
        post('/properties/schedulingGroup/queryPage',params).then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}

//新增班组类别/班组
export function schedulingGroupAdd(params:object) {
    return new Promise((resolve, reject) => {
        post('/properties/schedulingGroup/add',params).then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}

//编辑班组类别/班组
export function schedulingGroupEdit(params:object) {
    return new Promise((resolve, reject) => {
        post('/properties/schedulingGroup/edit',params).then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}

//删除
export function schedulingGroupDel(params:object) {
    return new Promise((resolve, reject) => {
        post('/properties/schedulingGroup/del',params).then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}

//新增班组成员
export function addMembers(params:object) {
    return new Promise((resolve, reject) => {
        post('/properties/schedulingGroup/addMembers',params).then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}

//删除班组成员
export function delMembers(params:object) {
    return new Promise((resolve, reject) => {
        post('/properties/schedulingGroup/delMembers',params).then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}

//获取班组成员分页查询
export function queryMembersPage(params:object) {
    return new Promise((resolve, reject) => {
        post('/properties/schedulingGroup/queryMembersPage',params).then((data) => {
            resolve(data);
        }).catch((error) => {
            reject(error)
        })
    })
}